<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class ServiceComment extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //  `user_id` int(11) NOT NULL COMMENT '用户ID',
        //  `comment` text NOT NULL COMMENT '评论内容',
        //  `parent_id` int(11) NOT NULL COMMENT '被回复的评论ID',
        //  `branch` int(11) NOT NULL COMMENT '分数，0-10分',
        Schema::dropIfExists('service_comment');
        Schema::create('service_comment', function (Blueprint $table){
            $table->comment = "服务评论表";
            $table->increments('id')->comment("ID");
            $table->integer("user_id")->comment("用户ID");
            $table->text("comment")->comment("评论内容");
            $table->integer("parent_id")->comment("回复");
            $table->integer('branch')->comment("评分");
            $table->integer('create_time')->comment("创建时间");
            $table->integer('update_time')->comment("更新时间");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
